import request from '@/utils/request'

// 新增字典
export function add(data) {
    return request({
        url: '/bms/admin/sys-dict/add',
        method: 'post',
        data: data
    })
}

// 修改字典
export function update(data) {
    return request({
        url: '/bms/admin/sys-dict/update',
        method: 'post',
        data: data
    })
}

// 获取分页字典列表
export function getPaginationList(params){
    return request({
        url: '/bms/admin/sys-dict/getPaginationList',
        method: 'get',
        params: params
    })
}

// 获取字典列表
export function getDictList(params){
    return request({
        url: '/bms/admin/sys-dict/getList',
        method: 'get',
        params: params
    })
}

// 获取字典类型列表
export function getTypes(){
    return request({
        url: '/bms/admin/sys-dict/getTypes',
        method: 'get'
    })
}

// 删除字典
export function del(id){
    return request({
        url: '/bms/admin/sys-dict/delete',
        method: 'delete',
        params: {id}
    })
}

